#ifndef _NUMERICAL_H_
#define _NUMERICAL_H_

#include <stdint.h>

static int constraini(int val, int lower, int upper)
{
	return ((val < lower) ? lower : ((val > upper) ? upper : val));
}

static float constrainf(float val, float lower, float upper)
{
	return ((val < lower) ? lower : ((val > upper) ? upper : val));
}

#endif
